export const getEChartWatermark = () => {
  const waterMarkText = 'HUIHIFI';
  const canvas = document.createElement('canvas');
  const ctx = canvas.getContext('2d')!;
  canvas.width = 300;
  canvas.height = 200;
  ctx.textAlign = 'center';
  ctx.textBaseline = 'middle';
  ctx.globalAlpha = 0.08;
  ctx.font = '24px Microsoft Yahei';
  ctx.translate(50, 50);
  ctx.rotate(-Math.PI / 6);
  ctx.fillText(waterMarkText, 0, 80);
  return {
    backgroundColor: {
      type: 'pattern',
      image: canvas,
      repeat: 'repeat',
    },
  };
};
